package com.zhb.designmode.creationmode.factory.abstractfactory;

import com.zhb.designmode.creationmode.factory.abstractfactory.factory.AbstractFactory;
import com.zhb.designmode.creationmode.factory.abstractfactory.factory.HuaweiFactory;
import com.zhb.designmode.creationmode.factory.abstractfactory.factory.XiaoMiFactory;
import com.zhb.designmode.creationmode.factory.abstractfactory.product.PC;
import com.zhb.designmode.creationmode.factory.abstractfactory.product.Phone;
import com.zhb.designmode.creationmode.factory.abstractfactory.product_huawei.HuaWeiPhone;

public class Client {
    public static void main(String[] args) {
        AbstractFactory xiaomiFactory = new XiaoMiFactory();
        PC xiaomiPC = xiaomiFactory.getPC();
        xiaomiPC.getName();
        Phone xiaomiPhone = xiaomiFactory.getPhone();
        xiaomiPhone.getName();

        AbstractFactory huaweiFactory = new HuaweiFactory();
        PC pc = huaweiFactory.getPC();
        pc.getName();
        Phone phone = huaweiFactory.getPhone();
        phone.getName();
    }
}
